package cn.shengchao.qywx.acl.impl;

import cn.shengchao.rule.base.ConditionGroup;
import cn.shengchao.rule.engine.IRule;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @program: examstarapi
 * @description: 数据库规则
 * @author: Xiong weiqiang
 * @create: 2025-04-14 18:38
 */
@Data
@NoArgsConstructor
public class DataRule implements IRule, Serializable {
    private Long id;
    private String name;
    private List<ConditionGroup> conditionGroups;
    private LocalDateTime startTime;
    private LocalDateTime endTime;
    private Integer priority;
    @Override
    public boolean equals(Object o) {
       return o!=null&&o.getClass().isAssignableFrom(IRule.class)  &&this.id.equals(((IRule)o).getId());
    }
}